<template>
  <div class="main">
    <p class="title">{{title}}</p>
    <p class="time">{{time}}</p>

    <div class="content">{{content}}</div>
  </div>
</template>

<script>
import api from "../../api";
import common from "../../api/common";
export default {
  title: '消息详情',
  data() {
    return {
      uid: this.$store.state.uid,
      id: common.getParam("id"),
      title: "",
      time: "",
      content: ""
    };
  },
  methods: {
    init() {
      api.usercenter.getMessageDetail(this.uid, this.id, res => {
          this.title = res.title;
          this.time = res.create_time;
          this.content = res.content
      });
    }
  },
  mounted() {
    this.init();
  }
};
</script>

<style lang="less" scoped>
.main {
  padding: 4vw;
  .title {
    font-size: 5vw;
    margin-bottom: 3vw;
  }
  .time {
    color: #999;
    font-size: 3.5vw;
    margin-bottom: 3vw;
    padding-bottom: 4vw;
    border-bottom: 1px solid #f2f2f2;
  }
  .content {
    font-size: 4vw;
  }
}
</style>